package com.chee.plant.hibernate.object.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the box table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="box"
 */

public abstract class BaseBox  implements Serializable {

	public static String REF = "Box";
	public static String PROP_FEED_ID = "FeedId";
	public static String PROP_COUNT = "Count";
	public static String PROP_ID = "Id";
	public static String PROP_MEDICINE_ID = "MedicineId";
	public static String PROP_COORD_Y = "CoordY";
	public static String PROP_USER_ID = "UserId";
	public static String PROP_COORD_X = "CoordX";
	public static String PROP_EQUIP_ID = "EquipId";


	// constructors
	public BaseBox () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseBox (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseBox (
		java.lang.Integer id,
		java.lang.Integer userId,
		java.lang.Integer coordX,
		java.lang.Integer coordY,
		java.lang.Integer medicineId,
		java.lang.Integer equipId,
		java.lang.Integer feedId,
		java.lang.Integer count) {

		this.setId(id);
		this.setUserId(userId);
		this.setCoordX(coordX);
		this.setCoordY(coordY);
		this.setMedicineId(medicineId);
		this.setEquipId(equipId);
		this.setFeedId(feedId);
		this.setCount(count);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.lang.Integer userId;
	private java.lang.Integer coordX;
	private java.lang.Integer coordY;
	private java.lang.Integer medicineId;
	private java.lang.Integer equipId;
	private java.lang.Integer feedId;
	private java.lang.Integer count;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="sequence"
     *  column="id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: user_id
	 */
	public java.lang.Integer getUserId () {
		return userId;
	}

	/**
	 * Set the value related to the column: user_id
	 * @param userId the user_id value
	 */
	public void setUserId (java.lang.Integer userId) {
		this.userId = userId;
	}



	/**
	 * Return the value associated with the column: coord_x
	 */
	public java.lang.Integer getCoordX () {
		return coordX;
	}

	/**
	 * Set the value related to the column: coord_x
	 * @param coordX the coord_x value
	 */
	public void setCoordX (java.lang.Integer coordX) {
		this.coordX = coordX;
	}



	/**
	 * Return the value associated with the column: coord_y
	 */
	public java.lang.Integer getCoordY () {
		return coordY;
	}

	/**
	 * Set the value related to the column: coord_y
	 * @param coordY the coord_y value
	 */
	public void setCoordY (java.lang.Integer coordY) {
		this.coordY = coordY;
	}



	/**
	 * Return the value associated with the column: medicine_id
	 */
	public java.lang.Integer getMedicineId () {
		return medicineId;
	}

	/**
	 * Set the value related to the column: medicine_id
	 * @param medicineId the medicine_id value
	 */
	public void setMedicineId (java.lang.Integer medicineId) {
		this.medicineId = medicineId;
	}



	/**
	 * Return the value associated with the column: equip_id
	 */
	public java.lang.Integer getEquipId () {
		return equipId;
	}

	/**
	 * Set the value related to the column: equip_id
	 * @param equipId the equip_id value
	 */
	public void setEquipId (java.lang.Integer equipId) {
		this.equipId = equipId;
	}



	/**
	 * Return the value associated with the column: feed_id
	 */
	public java.lang.Integer getFeedId () {
		return feedId;
	}

	/**
	 * Set the value related to the column: feed_id
	 * @param feedId the feed_id value
	 */
	public void setFeedId (java.lang.Integer feedId) {
		this.feedId = feedId;
	}



	/**
	 * Return the value associated with the column: count
	 */
	public java.lang.Integer getCount () {
		return count;
	}

	/**
	 * Set the value related to the column: count
	 * @param count the count value
	 */
	public void setCount (java.lang.Integer count) {
		this.count = count;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.chee.plant.hibernate.object.Box)) return false;
		else {
			com.chee.plant.hibernate.object.Box box = (com.chee.plant.hibernate.object.Box) obj;
			if (null == this.getId() || null == box.getId()) return false;
			else return (this.getId().equals(box.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}

private static final long serialVersionUID = 1L; 
}